<template>
<div class="main" v-loading="loading">
<!--  <video class="video" src="@/assets/image/example1.mp4" muted loop autoplay></video>-->
  <img src="@/assets/image/bgk.jpeg" class="video" alt="">
  <div class="box-login">
    <div class="box-1">
      <div class="left">
        <img src="@/assets/image/3.jpg" alt="">
      </div>
      <div class="right">
        <img class="logo" src="@/assets/image/logo.png" alt="">
        <el-form class="form" :label-position="labelPosition" label-width="0" :model="formLabelAlign">
          <el-form-item label="">
            <el-input placeholder="请输入用户名" v-model="formLabelAlign.name"></el-input>
          </el-form-item>
          <el-form-item label="">
            <el-input placeholder="请输入密码" type="password" v-model="formLabelAlign.region"></el-input>
          </el-form-item>
        </el-form>
        <div class="bottom-box">
          <el-button type="info" @click="submit" class="defaultBtn">立即登录</el-button>
        </div>
      </div>
    </div>
  </div>
</div>
</template>
<script>
export default {
  data() {
    return {
      labelPosition: 'right',
      loading:false,
      formLabelAlign: {
        name: '',
        region: '',
        type: ''
      }
    };
  },
  methods:{
    submit(){
      this.loading=true
      setTimeout(()=>{
        this.loading=false
        this.$router.push('/index').catch(err=>{})
      },1000)
    }
  }
}
</script>
<style scoped lang="scss">
.main{
  width: 100%;
  height: 100vh;
  overflow: hidden;
  .video{
    width:100vw;
    height: 100vh;
    object-fit: cover;
  }
  .box-login{
    width: 100%;
    position: absolute;
    right: 0;
    top: 0;
    height: 100vh;
    background: rgba(0,0,0,0.3);
    background-size: cover;
    display: flex;
    justify-content: center;
    align-items: center;
    .box-1{
      width: 800px;
      height: 500px;
      border-radius: 5px;
      background: #fff;
      //padding: 25px;
      box-sizing: border-box;
      text-align: center;
      border: 1px solid #f6f6f6;
      display: flex;
      justify-content: space-between;
      .left{
        box-sizing: border-box;
          img{
            height: 100%;
            border-radius: 5px;
            object-fit: cover;
            width: 400px;
          }
      }
      .right{
        width: 400px;
        padding: 25px;
        box-sizing: border-box;
        .logo{
          height: 50px;
          margin-top: 80px;
        }
        .form{
          margin-top: 25px;
        }
        .bottom-box{
          width: 100%;
          display: flex;
          justify-content: space-between;
          margin-top: 25px;
          .defaultBtn{
            width: 100%;
            height: 45px;
          }
        }
      }

    }
  }
}
</style>
